package com.seleniti.enpareja.web.desktop.client.ui.view;

import org.ioc.commons.impl.gwt.client.ui.ViewComposite;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Widget;
import com.seleniti.enpareja.controller.ui.view.PreDownloadAppWarningView;
import com.seleniti.enpareja.controller.ui.view.PreDownloadAppWarningView.Action;
import com.seleniti.enpareja.controller.ui.view.PreDownloadAppWarningView.Event;
import com.seleniti.enpareja.controller.ui.view.PreDownloadAppWarningView.Operation;
import com.seleniti.enpareja.controller.ui.view.PreDownloadAppWarningView.Presenter;
import com.seleniti.enpareja.controller.ui.view.PreDownloadAppWarningViewPresenter;

public class PreDownloadAppWarningViewWidget extends EnParejaBaseView<Event, Operation, Action, Presenter> implements
		PreDownloadAppWarningView {

	private static PreDownloadAppWarningViewWidgetUiBinder uiBinder = GWT.create(PreDownloadAppWarningViewWidgetUiBinder.class);

	interface PreDownloadAppWarningViewWidgetUiBinder extends UiBinder<Widget, PreDownloadAppWarningViewWidget> {
	}

	public PreDownloadAppWarningViewWidget() {
		this.presenter = new PreDownloadAppWarningViewPresenter(this, eventbus, operationManager, actionController);
		initWidget(uiBinder.createAndBindUi(this));
	}

	@UiHandler("btnDownloadApp")
	void onDonwloadAppButtonClicked(ClickEvent evt) {
		this.presenter.onDownloadApp();
	}

	@UiHandler("btnDownloadApp2")
	void onDonwloadApp2ButtonClicked(ClickEvent evt) {
		this.presenter.onDownloadApp();
	}

	@UiHandler("btnGoToSettings")
	void onGoToSettings(ClickEvent evt) {
		this.presenter.onGoToSettings();
	}
}
